#ifndef ___MAP_AOI_H___
#define ___MAP_AOI_H___

#include "FactionDef.h"
class CMap;
//-----------------------------------------------------------------------------------------------------------------------------
/**
 * @brief
 */
class CMapAoi
{
public:
	CMapAoi( CMap * map );
	virtual ~CMapAoi();

	void entityEntry( xObjBase* entity );

	void entityLeave( xObjBase* entity );

	VOID getAllRoles( ObjList& role_list );

	VOID getAllEntitys(ObjList& entity_list );

	VOID getAllNpcEntitys( ObjVec& entity_list );

	VOID getAllSoldierEntitysByFaction( ObjVec& entity_list, USHORT faction_type );

	void getAllHostilityAnimals( ObjList &entity_list, USHORT faction_type );

	UINT getRoleCount();

	void releaseAllNPC();

	void KillNPC(xObjBase* entity);

	xObjBase* findEntity(U64 guid);
protected:

	VOID _roleLeave( xObjBase* entity );

	VOID _entityLeave( xObjBase* entity );

protected:
	CMap *							mpMap;
	ObjList							mhmapRoles;
	ObjList							mhmapEntitys;
};

#endif//___MAP_AOI_H___